﻿using System;
using System.ComponentModel.DataAnnotations;
using BootstrapBlazor.Components;

namespace Messhall.UI.Permission.Model.Permissions;

public class AuthorityModel
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public Guid KeyId { get; set; } = Guid.NewGuid();

    /// <summary>
    /// 权限Id
    /// </summary>
    public Guid PermissionKeyId { get; set; }

    /// <summary>
    /// 权限唯一CODE代码
    /// </summary>
    [Required(ErrorMessage = "{0}不能为空")]
    [AutoGenerateColumn(Order = 20, Filterable = true, Searchable = true)]
    [Display(Name = "Code")]
    public string Code { get; set; }

    /// <summary>
    /// 权限名称
    /// </summary>
    [Required(ErrorMessage = "{0}不能为空")]
    [AutoGenerateColumn(Order = 20, Filterable = true, Searchable = true)]
    [Display(Name = "权限名称")]
    public string Name { get; set; }
}